package com.example.easydownloadback.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.easydownloadback.domin.File;
import com.example.easydownloadback.domin.ResponseResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface FileService {
    String uploadPicture(MultipartFile file);

    String upload(MultipartFile file);

    void downLoad(String uuFile, HttpServletResponse response);

    ResponseResult<String> addFile(File file);

    ResponseResult<IPage<File>> listPage(Integer pageNum, Integer pageSize);

    ResponseResult<IPage<File>> listPageBySelectAndType(Integer pageNum, Integer pageSize, String selectValue, String partition);

    ResponseResult<String> deleteFileById(String id);

    ResponseResult<File> getFileById(String id);

    ResponseResult<String> updateFile(File file);

    ResponseResult deleteFileBatch(String[] ids);

    ResponseResult<IPage<File>> listFileByFileType(Integer pageNum, Integer pageSize, String fileType);

    ResponseResult<IPage<File>> listFileBySelectData(Integer pageNum, Integer pageSize, String selectData);

    void downLoadPicture(String uuFile, HttpServletResponse response);

    void downLoadFile(String fileName, HttpServletResponse response);

    String getFileIdByFileUrl(String fileUrl);
}
